<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一个js案例</title>
    <!-- <script>
        document.getElementById("mydiv").innerText="你好，jS";
    </script> -->
    <script src="js/base.js">
    </script>

</head>
<body>
    <div id="mydiv">HELLO,js</div>
    <h2>计算器</h2>
    数值1：<input type="text" id="ipt_num1"><br>
    数值2：<input type="text" id="ipt_num2"><br>
    <input type="button" value="相加" onclick="">

    <!-- <div>
        <input value="点击我" type="button" onclick="myalt()">
    </div> -->
    <script>
        function mycalc(){
            //1.得到第一个输入框的值
            var  num1=document.getElementById("ipt_num1").value;
            alert('num');
            //2.得到第二个输入框的值

            //3.让输入框1的值 + 输入框2的值，并弹出结果

           
        }
        var name='张三'
        var name1='李四'
        function myck(msg){
            alert("收到信息："+msg);
        }

        function showLog(msg){
            console.log(msg);
        }
        function myalt(){
            var num1=2;
            var num2=3;
            alert(num1+num2)
            
        }
    </script>
    <!-- <script>
        document.getElementById("mydiv").innerText="你好，jS";
    </script> -->
</body>
</html>